maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=pulumi-language-dotnet
pkgver=3.68.0
pkgrel=0
pkgdesc="Infrastructure as Code SDK (.NET language provider)"
url="https://pulumi.com/"
# blocked by pulumi
arch="x86_64 aarch64"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/pulumi/pulumi-dotnet/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pulumi-dotnet-$pkgver/pulumi-language-dotnet"
options="net" # download Go modules

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	mkdir -p bin

	go build -v \
		-o bin/pulumi-language-dotnet \
		-ldflags "-X github.com/pulumi/pulumi-dotnet/pulumi-language-dotnet/version.Version=v$pkgver"
}

check() {
	go test ./...
}

package() {
	install -Dm755 bin/pulumi-language-dotnet -t "$pkgdir"/usr/bin/
}

sha512sums="
eaa9f1cea899da5a587200183aa0fb3748ed9e95e93c055648a6cd8fa1d0a5a507f2759a9e7bc83dc139e7da3656b618b18628d625624040d087967ceed3029b  pulumi-language-dotnet-3.68.0.tar.gz
"
